package com.anyou.mall.dri.service.impl;

import java.util.List;
import com.anyou.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.anyou.mall.dri.mapper.TeamMapper;
import com.anyou.mall.dri.domain.Team;
import com.anyou.mall.dri.service.ITeamService;

/**
 * 司机加盟团队Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-09
 */
@Service
public class TeamServiceImpl implements ITeamService 
{
    @Autowired
    private TeamMapper teamMapper;

    /**
     * 查询司机加盟团队
     * 
     * @param teamId 司机加盟团队主键
     * @return 司机加盟团队
     */
    @Override
    public Team selectTeamByTeamId(Long teamId)
    {
        return teamMapper.selectTeamByTeamId(teamId);
    }

    /**
     * 查询司机加盟团队列表
     * 
     * @param team 司机加盟团队
     * @return 司机加盟团队
     */
    @Override
    public List<Team> selectTeamList(Team team)
    {
        return teamMapper.selectTeamList(team);
    }

    /**
     * 新增司机加盟团队
     * 
     * @param team 司机加盟团队
     * @return 结果
     */
    @Override
    public int insertTeam(Team team)
    {
        team.setCreateTime(DateUtils.getNowDate());
        return teamMapper.insertTeam(team);
    }

    /**
     * 修改司机加盟团队
     * 
     * @param team 司机加盟团队
     * @return 结果
     */
    @Override
    public int updateTeam(Team team)
    {
        team.setUpdateTime(DateUtils.getNowDate());
        return teamMapper.updateTeam(team);
    }

    /**
     * 批量删除司机加盟团队
     * 
     * @param teamIds 需要删除的司机加盟团队主键
     * @return 结果
     */
    @Override
    public int deleteTeamByTeamIds(Long[] teamIds)
    {
        return teamMapper.deleteTeamByTeamIds(teamIds);
    }

    /**
     * 删除司机加盟团队信息
     * 
     * @param teamId 司机加盟团队主键
     * @return 结果
     */
    @Override
    public int deleteTeamByTeamId(Long teamId)
    {
        return teamMapper.deleteTeamByTeamId(teamId);
    }
}
